import axios from 'axios'

export const getAllContainers = () => {
  return axios.get('/api/docker/getAllContainers', { timeout: 5000 })
}

export const startContainer = (id: string) => {
  return axios.post(`/api/docker/startContainer/${id}`)
}

export const stopContainer = (id: string) => {
  return axios.post(`/api/docker/stopContainer/${id}`)
}

export const getDockerImages = () => {
  return axios.get('/api/docker/getDockerImages', { timeout: 5000 })
}

export const removeImage = (imageIdOrName: string) => {
  return axios.delete(`/api/docker/${imageIdOrName}`, { timeout: 5000 })
}